#ifndef __YLW_CACHEMANAGER_H__
#define __YLW_CACHEMANAGER_H__

#include "Cache.hpp"
#include "TimerThread.hpp"

#include <string>
#include <vector>
#include  <list>
using std::list;
using std::string;
using std::vector;
using std::pair;

namespace ylw
{

class CacheManager
{
public:
    static void initCache();
    static Cache &getCache(size_t idx);//获取某个缓存
    static void periodicUpdateCaches();//定时更新所有缓存
    static void updateProcess(); 

private:
    static vector<Cache> _cacheList;//缓存的数量与线程个数一致
    static size_t _cacheNum;
    static Cache _globlCache;
    /* static size_t _memorySize; */
};


}//end of namespace ylw

#endif
